package com.ebuy.shopping.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.ebuy.shopping.model.Category;

@Service
public interface ICategoryService
{
    public Category load(int id) throws Exception;

    public int add(Category category) throws Exception;

    public int update(Category category) throws Exception;

    public List<Category> getCategories() throws Exception;

    public List<Category> getCategoriesByIndex() throws Exception;

    public List<Category> getCategoriesBySecondIndex() throws Exception;

    public List<Category> getCategoriesByParentId(int parentId)
            throws Exception;

    public List<Category> getCategoriesByGrade(int grade) throws Exception;

    public int delete(int id) throws Exception;

}
